package com.wu.prototype;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class PPrototypeApplication {

	private static final Logger logger = LoggerFactory.getLogger(PPrototypeApplication.class);

	public static void main(String[] args) throws CloneNotSupportedException {
		Cup cup = new Cup();
		cup.setDescription("陶瓷杯");
		Table table = new Table();
		table.setCup(cup);
		table.setDescription("办公桌");
		Room room = new Room();
		room.setTable(table);
		room.setDescription("办公室");

		Room room1 = room.clone();
		logger.info((room == room1)+"-房间");
		logger.info((room.getDescription() == room1.getDescription())+"-房间-描述");
		logger.info((room.getTable() == room1.getTable())+"-桌子");
		logger.info((room.getTable().getCup() == room1.getTable().getCup())+"-杯子");

//		SpringApplication.run(PPrototypeApplication.class, args);
	}
}
